package com.hoas.quickstart.threads.chapter01.chapter01_2_7;

public class MyThread extends Thread {

    private int count = 10;

    /**
     * 加上synchronized可演示线程安全情况
     */
    @Override
    public void run() {
        super.run();
        count--;

        System.out.printf("\n有%s计算,count=%d", this.currentThread().getName(), count);

    }
}
